System Requirements:
Windows 10 22H2
MATLAB R2023b
MATLAB Signal Processing Toolbox
Code tested on MATLAB R2023b

Installation:
https://www.mathworks.com/help/install/install-products.html
Install time may vary based on internet connection speed.

Instructions:
Demo Data Included = Photometry_Novelty_Sample_Data.csv
1.)Run the first block of code (Select lines 1 - 4, press F9) to create data input variables.
2.)Fill "working_data" variable by copy/pasting (do not include column headers):
	a.)Column 1 = time
	b.)Column 2 = DF/F0
3.)Fill "event_data" cells:
	a.)Cell {1,1}:
		i.)Column 1: S = social (or novel) investigation, E = empty (or familiar)
		ii.)Column 2: A = approach investigation, O = on-site investigation.
	b.)Cell {2,1}:
		i.)Column 1 = event start times
		ii.)Column 2 = event end times
		iii.)Column 3 = event length
		iv.)Column 4 = event intervals (first event interval should be NaN).
4.)Run the rest of the code (Lines 7 - end) to extract event traces.

Output:
The data structure "copy_events" will contain the normalized photometry traces designated by event start and stop timestamps,
which can be used for further analysis.
Run time is approximately 1.59 seconds, but may vary based on photometry sample rate and number of events.